<!--
 * @Author: fisher
 * @Date: 2022-10-26 19:05:00
 * @LastEditTime: 2022-10-26 20:57:23
 * @LastEditors: fisher
 * @Description: 
 * @FilePath: \tauri_app\src\views\home\preview\index.vue
-->
<template>
  <div id="map"></div>
</template>

<script setup>
import L from "leaflet";
import "leaflet/dist/leaflet.css";
import { onMounted } from "vue";
onMounted(() => {
  // var map;
  // var zoom = 12;

  // map = new T.Map("map");
  // map.centerAndZoom(new T.LngLat(116.40769, 39.89945), zoom);

  var map = new BMapGL.Map("map"); // 创建Map实例
  map.centerAndZoom(new BMapGL.Point(116.404, 39.915), 11); // 初始化地图,设置中心点坐标和地图级别
  map.enableScrollWheelZoom(true);
});
</script>
<style  scoped>
#mapContainer {
  width: 100%;
  height: 100%;
}
</style>